<template>
  <div id="subproject"></div>
  <el-button @click="getStore">全局仓储</el-button>
</template>

<script>
import micros from './micros/index'

export default {
  name: 'app',
  setup() {

    return {

    };
  },
  data() {
    return {

    };
  },
  methods: {
    getStore () {

    }
  },
  mounted () {
    const childApp = micros.childApp()
    // micros.microsStart()

    childApp.mountPromise.then((vm) => {
      childApp.update({ run: function (glob, ChildVue, childVm) {
        // childVm 就是子项目的app的引用
        childVm.config.globalProperties.$say = () => {
          console.log('你好')
        }
      }})
    })
  },
  components: {

  },
};
</script>


<style lang="scss">
#qiankun {
  text-align: center;
  color: #2c3e50;
}

</style>